﻿using UnityEngine;
using System.Collections;

public class EngineEffectController : MonoBehaviour {

	public ShipController2 shipController;
	public TrailRenderer trailRenderer;
	public ParticleSystem theParticleSystem;

	// Use this for initialization
	void Start () {


	}
	
	// Update is called once per frame
	void Update () {
		float alpha = shipController.speed/200.0f;
		alpha = Mathf.Clamp(alpha,0.0f,0.5f);


		Color col = theParticleSystem.startColor;
		col.a = alpha;
		theParticleSystem.startColor = col;
	}
}
